package com.example.pojo;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import lombok.NonNull;
import org.springframework.validation.annotation.Validated;

import java.time.LocalDateTime;
@Data
@Validated
public class User {
    @NonNull
    private Integer id;//主键ID
    @Pattern(regexp = "^//s{5,16}")
    private String username;//用户名
    @Pattern(regexp = "^//s{5,16}")
    private String password;//密码
    @Pattern(regexp = "^//s{1,10}")
    private String nickname;//昵称
    private String email;//邮箱
    private String userPic;//用户头像地址
    private LocalDateTime createTime;//创建时间
    private LocalDateTime updateTime;//更新时间
}
